package cn.wzy.mapper;

import cn.wzy.pojo.Role;
import cn.wzy.vo.GoPageVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (Role)表数据库访问层
 *
 * @author makejava
 * @since 2022-12-08 13:53:12
 */
public interface RoleMapper extends BaseMapper<Role> {


    List<Role> rolePage(@Param("keyword") String keyword, @Param("stater") Long stater, @Param("pageSize") Long pageSize);

    Long getTotal(GoPageVo goPageVo);

    void deleteRoleById(Long id);

    void updateRole(Role role);

    void addRole(Role role);

    void addRolePermissions(@Param("roleId") Long roleId, @Param("permissionSns") List<String> permissionSns);

    void deleteRolePermission(Long roleId);

    void deleteRoleMenu(Long roleId);

    void addRoleMenus(@Param("roleId") Long roleId, @Param("menuIds") List<Long> menuIds);

    List<Role> getAllRole();

}

